﻿<?php
global $rate,$hostr,$loginr,$passr,$dbr;

$q = mysql_query("SELECT COUNT(*) as count FROM players WHERE race='ELYOS'");
if($q == FALSE){ echo "Error";}
$qwe=mysql_fetch_array($q);
$ely = $qwe["count"]; //number of elyos
mysql_free_result($q);
$q = mysql_query("SELECT COUNT(*) as count FROM players WHERE race='ASMODIANS'");
if($q == FALSE){ echo "Error";}
$qwe=mysql_fetch_array($q);
$asmos = $qwe["count"];//number of asmos
$total=$ely+$asmos;//total number of players

mysql_free_result($q);
mysql_close();
$msconn = mysql_connect($hostr, $loginr, $passr) or die("Couldnt connect to MySQL server.");
$db = mysql_select_db($dbr, $msconn) or die("Couldnt connect to DB.");
$q=mysql_query("SELECT COUNT(*) as count FROM account_data WHERE activated='1'");
$qwe=mysql_fetch_array($q);
$accounts=$qwe["count"];
mysql_free_result($q);
mysql_close();


?>
<h2>Rates:</h2>
<p><font  color='black'>
Рейты на опыт: <?php echo $rate[0];?>x<br />
Рейты на дроп: <?php echo $rate[1];?>x<br />
Квест рейты: <?php echo $rate[2];?>x<br />
Рейты на кинару: <?php echo $rate[3];?>x<br />
Крафт рейты: <?php echo $rate[5];?>x<br /> 
АП Рейты: <?php echo $rate[6];?>x<br />
</p>

<h2>Server in numbers:</h2>
<p ><font color='black'>

Аккаунтов: <?php echo $accounts;?><br />
Асмодиан: <?php echo $asmos;?><br />
Элийцев: <?php echo $ely;?><br />
Чаров в общем: <?php echo $total;?>
</p>
